clear;
x1 = [1, 2, 1, 2];
x2 = [1, 2, 3, 4, 5];

y1 = conv(x1, x2);
ny1 = 0:1:length(y1)-1;
subplot(2,1,1);
stem(ny1, y1);
title('线性卷积结果');

% N>=N1+N2-1时不发生混叠
N = 8;
y2 = circonv(x1, x2, N);
ny2 = 0:1:length(y2)-1;
subplot(2,1,2);
stem(ny2, y2);
title('N=5点圆周卷积');
